package edu.jsnu.purchase.ticket.util;

import org.apache.commons.lang3.StringUtils;

public class LoginUtils {

    //需要被拦截的请求
	private static String[] NEED_LOGIN_PATH =
			{"/ticket/*"
			};

	public static boolean isNeedLoginUrl(String requestUrl) {
		if (StringUtils.isEmpty(requestUrl)) {
			return false;
		}
		for (String noLoginPath : NEED_LOGIN_PATH) {
			if (requestUrl.startsWith(noLoginPath)) {
				return true;
			}
		}
		return false;
	}

}
